/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package demo04;

/**
 *
 * @author 卢仕威
 */
public class CheckEmail {
    public static void main(String[] args) {
        String email="java2010404118@gmail.com";
        boolean flag;
        if(!(email.endsWith("@")||email.startsWith("@"))){
            flag=false;
        }
    }

if(flag=false;){
            System.out.println("是合法的Email");
}
}
